<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Data-Table 表格</title>
    <link rel="stylesheet" href="../../frame/layui/css/layui.css">
    <link rel="stylesheet" href="../../frame/static/css/style.css">
    <link rel="stylesheet" href="../../css/common.css">
    <link rel="stylesheet" href="../../css/message/modelEdit.css">
</head>
<body>
<div class="layui-col-md12">
    <form class="layui-form" url="admin/modelSet" id="ajaxForm" method="post">
        <input type="hidden" id="ids" value="" name="id">
        <div class="layui-form">
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">模板描述</label>
                <div class="layui-input-block">
                    <input id="desc" placeholder="请输入模板描述" class="layui-input" name="desc"/>
                </div>
            </div>
        </div>
        <div class="layui-form">
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-block">
                    <input id="title" placeholder="请输入标题" class="layui-input" name="title"/>
                </div>
            </div>
        </div>
        <div class="layui-form">
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">内容</label>
                <div class="layui-input-block">
                    <textarea id="content" placeholder="请输入内容" class="layui-textarea" name="content"></textarea>
                </div>
            </div>
            <div class="layui-form-item" style="overflow: hidden;">
                <div class="layui-input-block layui-input-right">
                    <a class="layui-btn" id="ajax-btn">立即提交</a>
                </div>
            </div>
        </div>
    </form>
</div>
<script src="../../js/public/jquery-3.1.1.min.js"></script>
<script src="../../js/layer/layer.js"></script>
<script src="../../js/public/common.js"></script>
<script>
    $(function(){
        let id = GetQueryString('id');
        let data = AjaxForm('admin/ModelDetail?id='+id);
        $('#desc').val(data.desc);
        $('#title').val(data.title);
        $('#content').val(data.content);
        $('#ids').val(data.id);
    })
</script>
</body>
</html>